package com.centaline.androidsalesblog.base;

import android.support.v4.util.ArrayMap;
import android.text.TextUtils;

import com.centaline.androidsalesblog.application.Header;
import com.centanet.framework.interfaces.IResponseListener;
import com.centanet.framework.network.UniversalApi;

/**
 * api基础父类
 * Created by guilin on 15/12/15.
 */
public abstract class BaseApi<T> extends UniversalApi<T> {

    public BaseApi(Class<?> tag, Class<T> aClass, IResponseListener<T> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    @Override
    protected ArrayMap<String, String> getHeaders() {
        return Header.getHeaders();
    }

    protected void putStringParams(String key, String value) {
        if (!TextUtils.isEmpty(value))
            putParams(key, value);
    }
}
